package com.yunfeng.learning.controller;

import com.yunfeng.learning.dto.OrderDTO;
import com.yunfeng.learning.dto.SystemNotificationDTO;
import com.yunfeng.learning.dto.UserDTO;
import com.yunfeng.learning.param.ResetPasswordParam;
import com.yunfeng.learning.param.UserRegisterParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

import java.util.List;

public interface UserApi {


    @ApiOperation(value = "注册新用户")
    @ApiResponses({
            @ApiResponse(code = 200, response = UserDTO.class, message = "用户注册成功")
    })
    UserDTO userRegister(@ApiParam(value = "用户注册信息", required = true) UserRegisterParam user);


    @ApiOperation(value = "用户详细信息")
    @ApiResponses({
            @ApiResponse(code = 200, response = UserDTO.class, message = "获取用户信息成.")
    })
    UserDTO queryUserDetail(@ApiParam(value = "用户ID", required = true) String id);


    @ApiOperation(value = "分页获取用户信息。")
    @ApiResponses({
            @ApiResponse(code = 200, response = UserDTO.class, message = "分页获取用户信息成功", responseContainer = "List")
    })
    List<UserDTO> queryUsers(
            @ApiParam(value = "用户名称") String name,
            @ApiParam(value = "用户id列表, 逗号分割。") String ids,
            @ApiParam(value = "当前页数") int page,
            @ApiParam(value = "每页数量") int pageSize);

    @ApiOperation(value = "重置用户密码")
    @ApiResponses({
            @ApiResponse(code = 200, response = UserDTO.class, message = "重置用户密码成功")
    })
    UserDTO resetPassword(@ApiParam(value = "用户ID", required = true) String id,
                          @ApiParam(value = "重置密码参数", required = true) ResetPasswordParam resetPasswordParam);


    @ApiOperation(value = "获取用户订单")
    @ApiResponses({
            @ApiResponse(code = 200, response = OrderDTO.class, message = "获取用户订单成功。", responseContainer = "List")
    })
    List<OrderDTO> queryUserOrders(
            @ApiParam(value = "用户ID", required = true) String id,
            @ApiParam(value = "订单状态") String status,
            @ApiParam(value = "当前页码") int page,
            @ApiParam(value = "每页数量") int pageSize);


    @ApiOperation(value = "获取系统通知。")
    @ApiResponses({
            @ApiResponse(code = 200, response = SystemNotificationDTO.class, message = "获取系统通知成功。", responseContainer = "List")
    })
    List<SystemNotificationDTO> queryNotifications(
            @ApiParam(value = "用户ID", required = true) String id,
            @ApiParam(value = "通知状态", required = false) String status,
            @ApiParam(value = "当前页码", required = false) int page,
            @ApiParam(value = "每页数量", required = false) int pageSize);




}
